﻿package com.hongguan.oms.service.grid;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.hongguan.oms.service.BaseService;

/**
 * GridParkInfo Service
 * 
 * @author 
 * 
 */
@Service
public class GridParkInfoService extends BaseService{

	public GridParkInfoService() {
		super();
		namespace = "GRID_PARK_INFO";
	}
	public List searchPark(Map param){
		return this.getSqlMapClientTemplate().queryForList(this.getStatementName("park_search"), param);
	}
	
	public long searchParkCount(Map param){
		return (Long)this.getSqlMapClientTemplate().queryForObject(this.getStatementName("park_search_count"), param);
	}
	public List searchParkById(Map param){
		return this.getSqlMapClientTemplate().queryForList(this.getStatementName("park_search_by_id"), param);
	}
	public boolean isNameSame(Map param){
		boolean flag=false;
		long num = (Long)this.getSqlMapClientTemplate().queryForObject(this.getStatementName("is_park_name_same"),param);
		if(num>0){
			flag=true;
		}
		return flag;
	}
	/**
	 * 保存GridParkInfo
	 * 
	 * @param gridparkinfo
	 * 
	 */
	public long addPark(Map param) {
		return (Long)this.getSqlMapClientTemplate().insert(this.getStatementName("park_add"),param);
	}
	/**
	 * 修改GridParkInfo
	 * 
	 * @param gridparkinfo
	 * 
	 */
	public void modifyPark(Map param) {
		this.getSqlMapClientTemplate().update(this.getStatementName("park_modify"),param);
	}


	/**
	 * 删除GridParkInfo
	 * 
	 * @param gridparkinfo
	 *            　GridParkInfo
	 */
	public void deletePark(Map param) {
		this.getSqlMapClientTemplate().delete(this.getStatementName("park_delete"),param);
	}
}

